<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 7.3.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon.ico">
  <link rel="mask-icon" href="/favicon.ico" color="#222">

<link rel="stylesheet" href="/css/main.css">

<link rel="stylesheet" href="https://fonts.loli.net/css?family=Lato:300,300italic,400,400italic,700,700italic%7CZCOOL+QingKe+HuangYou:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha256-DfWjNxDkM94fVBWx1H5BMMp0Zq7luBlV8QRcSES7s+0=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" integrity="sha256-Vzbj7sDDS/woiFS3uNKo8eIuni59rjyNGtXfstRzStA=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/themes/blue/pace-theme-bounce.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous"></script>

<script class="next-config" data-name="main" type="application/json">{"hostname":"www.kaaaaai.cn","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.12.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":"valine","storage":true,"lazyload":true,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="*　　由于公司的一个项目屡次出现 Guideline 4.3 - Design 审核被拒问题，想着能最大程度的解决这种问题出现，就去了解了一下怎么给项目增加垃圾代码以通过审核，这里给大家推荐两种。* 一、用 Python 生成垃圾文件">
<meta property="og:type" content="article">
<meta property="og:title" content="给你的 iOS 马甲项目增加一点垃圾代码">
<meta property="og:url" content="https://www.kaaaaai.cn/add-junk-code-to-ios-vest-project.html">
<meta property="og:site_name" content="壹拾肆">
<meta property="og:description" content="*　　由于公司的一个项目屡次出现 Guideline 4.3 - Design 审核被拒问题，想着能最大程度的解决这种问题出现，就去了解了一下怎么给项目增加垃圾代码以通过审核，这里给大家推荐两种。* 一、用 Python 生成垃圾文件">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2018-06-28T11:37:05.000Z">
<meta property="article:modified_time" content="2020-11-22T08:25:55.000Z">
<meta property="article:author" content="Kaaaaai">
<meta property="article:tag" content="EXP">
<meta property="article:tag" content="iOS">
<meta property="article:tag" content="OC">
<meta property="article:tag" content="Python">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="https://www.kaaaaai.cn/add-junk-code-to-ios-vest-project.html">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://www.kaaaaai.cn/add-junk-code-to-ios-vest-project.html","path":"/add-junk-code-to-ios-vest-project.html","title":"给你的 iOS 马甲项目增加一点垃圾代码"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>给你的 iOS 马甲项目增加一点垃圾代码 | 壹拾肆</title>
  
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-102185873-1"></script>
  <script class="next-config" data-name="google_analytics" type="application/json">{"tracking_id":"UA-102185873-1","only_pageview":false}</script>
  <script src="/js/third-party/analytics/google-analytics.js"></script>

  <script src="/js/third-party/analytics/baidu-analytics.js"></script>
  <script async src="https://hm.baidu.com/hm.js?9578d14210d67becef48447e4f6b3f20"></script>



<link rel="dns-prefetch" href="https://waline-server-kaaaaai.vercel.app"> <script type="text/javascript" src="/js/link-highlight.js"></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<link rel="alternate" href="/atom.xml" title="壹拾肆" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">壹拾肆</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">有些安排是多余的 这片空旷对我有益</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-moments"><a href="/bb/" rel="section"><i class="fa fa-coffee fa-fw"></i>碎片</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E7%94%A8-Python-%E7%94%9F%E6%88%90%E5%9E%83%E5%9C%BE%E6%96%87%E4%BB%B6"><span class="nav-number">1.</span> <span class="nav-text">一、用 Python 生成垃圾文件</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E7%AC%AC%E4%B8%80%E6%AD%A5-%E9%A6%96%E5%85%88%E7%94%9F%E6%88%90%E4%B8%80%E4%B8%AA500%E4%BD%8D%E7%9A%84%E6%95%B0%E7%BB%84-%E9%A9%BC%E5%B3%B0%E7%B1%BB%E5%9E%8B%E7%9A%84%E5%85%83%E7%B4%A0-%E7%94%A8%E4%BD%9C%E6%96%87%E4%BB%B6%E5%90%8D-eg-AsdfdfGsd"><span class="nav-number">1.1.</span> <span class="nav-text">1.第一步:首先生成一个500位的数组 驼峰类型的元素 用作文件名 eg:AsdfdfGsd</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E7%AC%AC%E4%BA%8C%E6%AD%A5-%E7%94%A8%E4%B8%8A%E8%BE%B9%E7%94%9F%E6%88%90%E7%9A%84%E6%95%B0%E7%BB%84%E6%9D%A5%E5%88%9B%E5%BB%BA%E5%AF%B9%E5%BA%94%E7%9A%84-h-%E5%92%8C-m-%E6%96%87%E4%BB%B6"><span class="nav-number">1.2.</span> <span class="nav-text">2.第二步: 用上边生成的数组来创建对应的 .h 和 .m 文件</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E7%94%A8%E9%80%A0%E5%A5%BD%E7%9A%84%E8%BD%AE%E5%AD%90%E7%9B%B4%E6%8E%A5%E7%94%9F%E6%88%90"><span class="nav-number">2.</span> <span class="nav-text">二、用造好的轮子直接生成</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Kaaaaai"
      src="https://s2.loli.net/2022/03/29/GSJKrCRi4owa9hq.png">
  <p class="site-author-name" itemprop="name">Kaaaaai</p>
  <div class="site-description" itemprop="description">🐨🐨</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">100</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">7</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">66</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="sidebar-button site-overview-item animated">
    <button><i class="fa fa-comment"></i>
      Chat
    </button>
  </div>
  <div class="links-of-author site-overview-item animated">
      <span class="links-of-author-item">
        <a href="https://github.com/Kaaaaai" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;Kaaaaai" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://stackoverflow.com/users/8342030/kaaaaai" title="StackOverflow → https:&#x2F;&#x2F;stackoverflow.com&#x2F;users&#x2F;8342030&#x2F;kaaaaai" rel="noopener" target="_blank"><i class="fab fa-stack-overflow fa-fw"></i>StackOverflow</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://www.instagram.com/edisonlllllk" title="Instagram → https:&#x2F;&#x2F;www.instagram.com&#x2F;edisonlllllk" rel="noopener" target="_blank"><i class="fab fa-instagram fa-fw"></i>Instagram</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:root@kaaaaai.cn" title="E-Mail → mailto:root@kaaaaai.cn" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>



        </div>
      </div>

      
    <!-- 网易云歌曲 -->
    <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=421203025&auto=1&height=66"></iframe>
        <div class="back-to-top animated" role="button" aria-label="返回顶部">
          <i class="fa fa-arrow-up"></i>
          <span>0%</span>
        </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://www.kaaaaai.cn/add-junk-code-to-ios-vest-project.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.loli.net/2022/03/29/GSJKrCRi4owa9hq.png">
      <meta itemprop="name" content="Kaaaaai">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="壹拾肆">
      <meta itemprop="description" content="🐨🐨">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="给你的 iOS 马甲项目增加一点垃圾代码 | 壹拾肆">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          给你的 iOS 马甲项目增加一点垃圾代码
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2018-06-28 19:37:05" itemprop="dateCreated datePublished" datetime="2018-06-28T19:37:05+08:00">2018-06-28</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E7%AC%94%E8%AE%B0/" itemprop="url" rel="index"><span itemprop="name">笔记</span></a>
        </span>
    </span>

  
    <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">阅读次数：</span>
      <span id="busuanzi_value_page_pv"></span>
    </span>
  
  <span class="post-meta-item">
    
    <span class="post-meta-item-icon">
      <i class="far fa-comment"></i>
    </span>
    <span class="post-meta-item-text">Waline：</span>
  
    <a title="waline" href="/add-junk-code-to-ios-vest-project.html#waline" itemprop="discussionUrl">
      <span class="post-comments-count waline-comment-count" data-path="/add-junk-code-to-ios-vest-project.html" itemprop="commentCount"></span>
    </a>
  </span>
  
  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>8.1k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>7 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p>*　　由于公司的一个项目屡次出现 <code>Guideline 4.3 - Design</code> 审核被拒问题，想着能最大程度的解决这种问题出现，就去了解了一下怎么给项目增加垃圾代码以通过审核，这里给大家推荐两种。*</p>
<h1 id="一、用-Python-生成垃圾文件"><a href="#一、用-Python-生成垃圾文件" class="headerlink" title="一、用 Python 生成垃圾文件"></a>一、用 Python 生成垃圾文件</h1><h2 id="1-第一步-首先生成一个500位的数组-驼峰类型的元素-用作文件名-eg-AsdfdfGsd"><a href="#1-第一步-首先生成一个500位的数组-驼峰类型的元素-用作文件名-eg-AsdfdfGsd" class="headerlink" title="1.第一步:首先生成一个500位的数组 驼峰类型的元素 用作文件名 eg:AsdfdfGsd"></a>1.第一步:首先生成一个500位的数组 驼峰类型的元素 用作文件名 eg:AsdfdfGsd</h2><figure class="highlight python"><figcaption><span>Python</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> random</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> string</span><br><span class="line"></span><br><span class="line">first = <span class="string">&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;</span></span><br><span class="line"></span><br><span class="line">second = <span class="string">&quot;abcdefghijklmnopqrstuvwxyz&quot;</span></span><br><span class="line"></span><br><span class="line">number = <span class="string">&quot;345&quot;</span></span><br><span class="line"></span><br><span class="line">index = <span class="number">0</span></span><br><span class="line"></span><br><span class="line">array = []</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">500</span>):</span><br><span class="line"></span><br><span class="line">    final=(random.choice(first))</span><br><span class="line"></span><br><span class="line">    index = random.randint(<span class="number">3</span>, <span class="number">5</span>)</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(index):</span><br><span class="line"></span><br><span class="line">        final+=(random.choice(second))</span><br><span class="line"></span><br><span class="line">    final += (random.choice(first))</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(index):</span><br><span class="line"></span><br><span class="line">        final+=(random.choice(second))</span><br><span class="line"></span><br><span class="line">    array.append(final)</span><br><span class="line">    </span><br><span class="line"><span class="built_in">print</span> (array)</span><br></pre></td></tr></table></figure>

<p>PS.如果是直接复制粘贴，不要忘记 <code>Python</code> 变态的首行缩进。</p>
<h2 id="2-第二步-用上边生成的数组来创建对应的-h-和-m-文件"><a href="#2-第二步-用上边生成的数组来创建对应的-h-和-m-文件" class="headerlink" title="2.第二步: 用上边生成的数组来创建对应的 .h 和 .m 文件"></a>2.第二步: 用上边生成的数组来创建对应的 <code>.h</code> 和 <code>.m</code> 文件</h2><figure class="highlight python"><figcaption><span>Python</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> random</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> os</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> string</span><br><span class="line"></span><br><span class="line"><span class="comment">#创建.h文件</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">text_createH</span>(<span class="params">fileNmae,msg,msg1,propertyNumber,methodArray,msg3</span>):</span><br><span class="line"></span><br><span class="line">    full_path = <span class="string">&#x27;/Users/zhoujinglin/Desktop/python-H-M/&#x27;</span> + fileNmae + <span class="string">&#x27;.h&#x27;</span></span><br><span class="line"></span><br><span class="line">    file = <span class="built_in">open</span>(full_path, <span class="string">&#x27;w&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    file.write(<span class="string">&#x27;//\n//  &#x27;</span>+fileNmae+<span class="string">&#x27;.h\n//  SajiaoShopping\n\n//  Created by Kaaaaai bo on 18/06/28.\n//  Copyright ©  2018年 Kaaaaai. All rights reserved.\n//\n\n&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    file.write(msg)</span><br><span class="line"></span><br><span class="line">    file.write(msg1)</span><br><span class="line"></span><br><span class="line">    propryNameArray = []</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> index <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">1</span>,propertyNumber):</span><br><span class="line"></span><br><span class="line">        propryNameArray.append(random.choice(array))</span><br><span class="line"></span><br><span class="line">    propryNameArray = <span class="built_in">list</span>(<span class="built_in">set</span>(propryNameArray))</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> propertyName <span class="keyword">in</span> propryNameArray:</span><br><span class="line">        file.write(<span class="string">&#x27;@property(nonatomic,strong)&#x27;</span>+random.choice(classArray)+<span class="string">&#x27; * &#x27;</span>+propertyName+<span class="string">&#x27;;\n&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    file.write(<span class="string">&#x27;\n\n&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> methodName <span class="keyword">in</span> methodArray:</span><br><span class="line"></span><br><span class="line">        file.write(<span class="string">&#x27;- (void)pushTo&#x27;</span>+methodName+<span class="string">&#x27;VC:(NSDictionary *)info;\n&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    file.write(msg3)</span><br><span class="line"></span><br><span class="line">    file.close()</span><br><span class="line"></span><br><span class="line">    <span class="built_in">print</span>(<span class="string">&#x27;Done&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment">#创建.m文件</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">text_createM</span>(<span class="params">fileNmae,msg,msg1,methodArray,msg3</span>):</span><br><span class="line"></span><br><span class="line">    full_path = <span class="string">&#x27;/Users/zhoujinglin/Desktop/python-H-M/&#x27;</span> + fileNmae + <span class="string">&#x27;.m&#x27;</span></span><br><span class="line"></span><br><span class="line">    file = <span class="built_in">open</span>(full_path, <span class="string">&#x27;w&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    file.write(<span class="string">&#x27;//\n//  &#x27;</span>+fileNmae+<span class="string">&#x27;.m\n//  SajiaoShopping\n\n//  Created by Kaaaaai bo on 18/06/28.\n//  Copyright ©  2017年 Kaaaaai. All rights reserved.\n//\n\n&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    file.write(msg)</span><br><span class="line"></span><br><span class="line">    file.write(msg1)</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> methodName <span class="keyword">in</span> methodArray:</span><br><span class="line"></span><br><span class="line">        file.write(<span class="string">&#x27;- (void)pushTo&#x27;</span>+methodName+<span class="string">&#x27;VC:(NSDictionary *)info\n&#123;\n\n  NSMutableArray *array = [NSMutableArray array];\n&#x27;</span>)</span><br><span class="line"></span><br><span class="line">        number = random.randint(<span class="number">3</span>, <span class="number">10</span>)</span><br><span class="line"></span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">1</span>,number):</span><br><span class="line"></span><br><span class="line">            file.write(<span class="string">&#x27;  [array addObject:@&quot;&#x27;</span>+random.choice(array)+<span class="string">&#x27;&quot;];\n&#x27;</span>)</span><br><span class="line"></span><br><span class="line">        file.write(<span class="string">&#x27;\n&#125;\n\n&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    file.write(msg3)</span><br><span class="line"></span><br><span class="line">    file.close()</span><br><span class="line"></span><br><span class="line">    <span class="built_in">print</span>(<span class="string">&#x27;Done&#x27;</span>)</span><br><span class="line"></span><br><span class="line">classArray = [<span class="string">&#x27;NSString&#x27;</span>,<span class="string">&#x27;UILabel&#x27;</span>,<span class="string">&#x27;NSDictionary&#x27;</span>,<span class="string">&#x27;NSData&#x27;</span>,<span class="string">&#x27;UIScrollView&#x27;</span>,<span class="string">&#x27;UIView&#x27;</span>]</span><br><span class="line"></span><br><span class="line">array = [<span class="string">&#x27;HwxrFvrj&#x27;</span>, <span class="string">&#x27;QnzduQbtdd&#x27;</span>, <span class="string">&#x27;PvcrwLtqhf&#x27;</span>, <span class="string">&#x27;UvdhDbjn&#x27;</span>, <span class="string">&#x27;SuntmyTxvyzg&#x27;</span>, <span class="string">&#x27;CvlxwBipbp&#x27;</span>, <span class="string">&#x27;GzrdyzIbimvz&#x27;</span>, <span class="string">&#x27;CqsjqMmgsp&#x27;</span>, <span class="string">&#x27;OxaaeuWjhasc&#x27;</span>, <span class="string">&#x27;NjiardRvwgbi&#x27;</span>, <span class="string">&#x27;NcculmLtpljq&#x27;</span>, <span class="string">&#x27;ApoqQrll&#x27;</span>, <span class="string">&#x27;GkgokDyvjb&#x27;</span>, <span class="string">&#x27;EblldkVouplj&#x27;</span>, <span class="string">&#x27;KfdrFvnw&#x27;</span>, <span class="string">&#x27;SfhyhObftc&#x27;</span>, <span class="string">&#x27;SmruByoc&#x27;</span>, <span class="string">&#x27;YzcccvXmpmit&#x27;</span>, <span class="string">&#x27;OmqvaHpxat&#x27;</span>, <span class="string">&#x27;XzytsUyvyd&#x27;</span>, <span class="string">&#x27;MjforNnnyi&#x27;</span>, <span class="string">&#x27;ZvjhuIdogs&#x27;</span>, <span class="string">&#x27;BzfrxzSeahxc&#x27;</span>, <span class="string">&#x27;PycycwFjtpny&#x27;</span>, <span class="string">&#x27;XvngtoSedljr&#x27;</span>, <span class="string">&#x27;DktiaCbucd&#x27;</span>, <span class="string">&#x27;AqbplNuodc&#x27;</span>, <span class="string">&#x27;MzkvgZuala&#x27;</span>, <span class="string">&#x27;KdwzIoej&#x27;</span>, <span class="string">&#x27;AaynatUpqcfd&#x27;</span>, <span class="string">&#x27;IyvwhZvtjc&#x27;</span>, <span class="string">&#x27;UmijGmsy&#x27;</span>, <span class="string">&#x27;AoayndXxghym&#x27;</span>]</span><br><span class="line"></span><br><span class="line">array = <span class="built_in">list</span>(<span class="built_in">set</span>(array))</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> name <span class="keyword">in</span> array:</span><br><span class="line"></span><br><span class="line">    number = random.randint(<span class="number">3</span>, <span class="number">10</span>)</span><br><span class="line"></span><br><span class="line">    methodArray = []</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">1</span>,<span class="number">5</span>):</span><br><span class="line"></span><br><span class="line">        methodArray.append(random.choice(array))</span><br><span class="line"></span><br><span class="line">    methodArray = <span class="built_in">list</span>(<span class="built_in">set</span>(methodArray))<span class="comment">#数组去重</span></span><br><span class="line"></span><br><span class="line">    text_createH(name+<span class="string">&#x27;ViewController&#x27;</span>, <span class="string">&#x27;#import &lt;UIKit/UIKit.h&gt;\n&#x27;</span>,<span class="string">&#x27;@interface &#x27;</span>+name+ <span class="string">&#x27;ViewController:&#x27;</span>+ <span class="string">&#x27;UIViewController\n\n&#x27;</span>,number,methodArray,<span class="string">&#x27;\n\n@end&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    text_createM(name+<span class="string">&#x27;ViewController&#x27;</span>, <span class="string">&#x27;#import &quot;&#x27;</span>+name+<span class="string">&#x27;ViewController.h&quot;\n\n&#x27;</span> <span class="string">&#x27;@interface &#x27;</span>+ name+<span class="string">&#x27;ViewController()\n\n @end\n\n&#x27;</span>,<span class="string">&#x27;@implementation &#x27;</span>+name+<span class="string">&#x27;ViewController\n\n- (void)viewDidLoad &#123; \n\n [super viewDidLoad];\n\n&#125;\n\n&#x27;</span>,methodArray,<span class="string">&#x27;\n\n@end&#x27;</span>)</span><br></pre></td></tr></table></figure>

<h1 id="二、用造好的轮子直接生成"><a href="#二、用造好的轮子直接生成" class="headerlink" title="二、用造好的轮子直接生成"></a>二、用造好的轮子直接生成</h1><p><a target="_blank" rel="noopener" href="https://github.com/klaus01/KLGenerateSpamCode">KLGenerateSpamCode 垃圾代码生成器</a></p>
<p>这个项目不仅可以生成垃圾代码，还可以自动化修改类名前缀，详细包含功能如下：</p>
<blockquote>
<p><strong>主要功能：</strong><br>修改工程名<br>修改类名前缀<br>扫描工程中的代码，生成同等数量的 <code>Category</code> 文件，文件中及是同等方法数量的垃圾代码。<br>修改 <code>xxx.xcassets</code> 文件夹中的 <code>png</code> 资源文件名。<br>删除代码中的所有注释和空行。</p>
</blockquote>
<p>使用时值得注意的有两点，一个是，他生成垃圾代码会遍历你所有的类名，然后生成无用的打印类，而实际使用时，我们并不需要增加如此多的代码，可以选择性的导入相关的 <code>.m</code> 和 <code>.h</code> 文件；另一个是在配置文件中的这个属性</p>
<blockquote>
<ul>
<li><code>ignoreDirNames</code> [忽略文件夹名称字符串] 忽略这些文件夹，对-<code>modifyClassNamePrefix</code> 和 - <code>spamCodeOut</code> 参数有效。目前只会忽略源码文件夹绝对路径下一级的这些目录。如：&#x2F;p&#x2F;s - <code>ignoreDirNames categorys</code>，那么 <code>/p/s/categorys</code> 会被忽略，但 <code>/p/s/viewControllers/categorys</code> 不会忽略。</li>
</ul>
</blockquote>
<p>因为他设定逻辑的原因，所以你可能要重复添加文件夹路径。这里我们需要做的是，到项目内部的<code>main</code> 方法里，添加判断，比如在这个方法可以添加判断，如果文件路径包含你想跳过的字符，直接 <code>return</code> ，就不用那么费劲了。</p>
<figure class="highlight objectivec"><figcaption><span>Objective-C</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br></pre></td><td class="code"><pre><span class="line"><span class="type">void</span> modifyClassNamePrefix(<span class="built_in">NSMutableString</span> *projectContent, <span class="built_in">NSString</span> *sourceCodeDir, <span class="built_in">NSArray</span>&lt;<span class="built_in">NSString</span> *&gt; *ignoreDirNames, <span class="built_in">NSString</span> *oldName, <span class="built_in">NSString</span> *newName) &#123;</span><br><span class="line">    <span class="built_in">NSFileManager</span> *fm = [<span class="built_in">NSFileManager</span> defaultManager];</span><br><span class="line">    </span><br><span class="line">    <span class="comment">// 遍历源代码文件 h 与 m 配对，swift</span></span><br><span class="line">    <span class="built_in">NSArray</span>&lt;<span class="built_in">NSString</span> *&gt; *files = [fm contentsOfDirectoryAtPath:sourceCodeDir error:<span class="literal">nil</span>];</span><br><span class="line">    <span class="type">BOOL</span> isDirectory;</span><br><span class="line">    <span class="keyword">for</span> (<span class="built_in">NSString</span> *filePath <span class="keyword">in</span> files) &#123;</span><br><span class="line">        <span class="built_in">NSString</span> *path = [sourceCodeDir stringByAppendingPathComponent:filePath];</span><br><span class="line">        <span class="keyword">if</span> ([fm fileExistsAtPath:path isDirectory:&amp;isDirectory] &amp;&amp; isDirectory) &#123;</span><br><span class="line">            <span class="keyword">if</span> (![ignoreDirNames containsObject:filePath]) &#123;</span><br><span class="line">                modifyClassNamePrefix(projectContent, path, ignoreDirNames, oldName, newName);</span><br><span class="line">            &#125;</span><br><span class="line">            <span class="keyword">continue</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        </span><br><span class="line">        <span class="built_in">NSString</span> *fileName = filePath.lastPathComponent.stringByDeletingPathExtension;</span><br><span class="line">        <span class="built_in">NSString</span> *fileExtension = filePath.pathExtension;</span><br><span class="line">        <span class="built_in">NSString</span> *newClassName;</span><br><span class="line">        <span class="keyword">if</span> ([fileName hasPrefix:oldName]) &#123;</span><br><span class="line">            newClassName = [newName stringByAppendingString:[fileName substringFromIndex:oldName.length]];</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            newClassName = [newName stringByAppendingString:fileName];</span><br><span class="line">        &#125;</span><br><span class="line">        </span><br><span class="line">        <span class="comment">// 文件名 Const.ext &gt; DDConst.ext</span></span><br><span class="line">        <span class="keyword">if</span> ([fileExtension isEqualToString:<span class="string">@&quot;h&quot;</span>]) &#123;</span><br><span class="line">            <span class="built_in">NSString</span> *mFileName = [fileName stringByAppendingPathExtension:<span class="string">@&quot;m&quot;</span>];</span><br><span class="line">            <span class="keyword">if</span> ([files containsObject:mFileName]) &#123;</span><br><span class="line">                <span class="built_in">NSString</span> *oldFilePath = [[sourceCodeDir stringByAppendingPathComponent:fileName] stringByAppendingPathExtension:<span class="string">@&quot;h&quot;</span>];</span><br><span class="line">                <span class="built_in">NSString</span> *newFilePath = [[sourceCodeDir stringByAppendingPathComponent:newClassName] stringByAppendingPathExtension:<span class="string">@&quot;h&quot;</span>];</span><br><span class="line">                renameFile(oldFilePath, newFilePath);</span><br><span class="line">                oldFilePath = [[sourceCodeDir stringByAppendingPathComponent:fileName] stringByAppendingPathExtension:<span class="string">@&quot;m&quot;</span>];</span><br><span class="line">                newFilePath = [[sourceCodeDir stringByAppendingPathComponent:newClassName] stringByAppendingPathExtension:<span class="string">@&quot;m&quot;</span>];</span><br><span class="line">                renameFile(oldFilePath, newFilePath);</span><br><span class="line">                oldFilePath = [[sourceCodeDir stringByAppendingPathComponent:fileName] stringByAppendingPathExtension:<span class="string">@&quot;xib&quot;</span>];</span><br><span class="line">                <span class="keyword">if</span> ([fm fileExistsAtPath:oldFilePath]) &#123;</span><br><span class="line">                    newFilePath = [[sourceCodeDir stringByAppendingPathComponent:newClassName] stringByAppendingPathExtension:<span class="string">@&quot;xib&quot;</span>];</span><br><span class="line">                    renameFile(oldFilePath, newFilePath);</span><br><span class="line">                &#125;</span><br><span class="line">                </span><br><span class="line">                <span class="keyword">@autoreleasepool</span> &#123;</span><br><span class="line">                    modifyFilesClassName(gSourceCodeDir, fileName, newClassName);</span><br><span class="line">                &#125;</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                <span class="keyword">continue</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; <span class="keyword">else</span> <span class="keyword">if</span> ([fileExtension isEqualToString:<span class="string">@&quot;swift&quot;</span>]) &#123;</span><br><span class="line">            <span class="built_in">NSString</span> *oldFilePath = [[sourceCodeDir stringByAppendingPathComponent:fileName] stringByAppendingPathExtension:<span class="string">@&quot;swift&quot;</span>];</span><br><span class="line">            <span class="built_in">NSString</span> *newFilePath = [[sourceCodeDir stringByAppendingPathComponent:newClassName] stringByAppendingPathExtension:<span class="string">@&quot;swift&quot;</span>];</span><br><span class="line">            renameFile(oldFilePath, newFilePath);</span><br><span class="line">            oldFilePath = [[sourceCodeDir stringByAppendingPathComponent:fileName] stringByAppendingPathExtension:<span class="string">@&quot;xib&quot;</span>];</span><br><span class="line">            <span class="keyword">if</span> ([fm fileExistsAtPath:oldFilePath]) &#123;</span><br><span class="line">                newFilePath = [[sourceCodeDir stringByAppendingPathComponent:newClassName] stringByAppendingPathExtension:<span class="string">@&quot;xib&quot;</span>];</span><br><span class="line">                renameFile(oldFilePath, newFilePath);</span><br><span class="line">            &#125;</span><br><span class="line">            </span><br><span class="line">            <span class="keyword">@autoreleasepool</span> &#123;</span><br><span class="line">                modifyFilesClassName(gSourceCodeDir, fileName.stringByDeletingPathExtension, newClassName);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="keyword">continue</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        </span><br><span class="line">        <span class="comment">// 修改工程文件中的文件名</span></span><br><span class="line">        <span class="built_in">NSString</span> *regularExpression = [<span class="built_in">NSString</span> stringWithFormat:<span class="string">@&quot;\\b%@\\b&quot;</span>, fileName];</span><br><span class="line">        regularReplacement(projectContent, regularExpression, newClassName);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>




    </div>

    
    
    

    <footer class="post-footer">
          <div class="reward-container">
  <div></div>
  <button>
    请喝咖啡
  </button>
  <div class="post-reward">
      <div>
        <img src="/images/loading-style-3.gif" data-original="https://s2.loli.net/2022/07/02/Gce8a5QAqrZ3X9R.gif" alt="Kaaaaai 微信">
        <span>微信</span>
      </div>

  </div>
</div>

          

<div class="post-copyright">
<ul>
  <li class="post-copyright-author">
      <strong>本文作者： </strong>Kaaaaai
  </li>
  <li class="post-copyright-link">
      <strong>本文链接：</strong>
      <a href="https://www.kaaaaai.cn/add-junk-code-to-ios-vest-project.html" title="给你的 iOS 马甲项目增加一点垃圾代码">https://www.kaaaaai.cn/add-junk-code-to-ios-vest-project.html</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>

          <div class="post-tags">
              <a href="/tags/EXP/" rel="tag"><i class="fa fa-tag"></i> EXP</a>
              <a href="/tags/iOS/" rel="tag"><i class="fa fa-tag"></i> iOS</a>
              <a href="/tags/OC/" rel="tag"><i class="fa fa-tag"></i> OC</a>
              <a href="/tags/Python/" rel="tag"><i class="fa fa-tag"></i> Python</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/yansi-who-knows.html" rel="prev" title="焉识！焉识？">
                  <i class="fa fa-chevron-left"></i> 焉识！焉识？
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/be-a-man.html" rel="next" title="长大成人">
                  长大成人 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    <div class="comments" id="waline"></div>
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Kaaaaai</span>
</div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
    <span title="站点总字数">234k</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">3:33</span>
  </span>
</div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>
  <!-- time -->
  <div id="show-time">
    <span id="span_dt_dt"></span>
  </div>
  <script>
      function show_date_time() {
        window.setTimeout("show_date_time()", 1000);
        BirthDay = new Date("6/23/2017 19:37:01");
        today = new Date();
        //总时间
        timeold = (today.getTime() - BirthDay.getTime());
        sectimeold = timeold / 1000
        secondsold = Math.floor(sectimeold);
        msPerDay = 24 * 60 * 60 * 1000
        e_daysold = timeold / msPerDay
        daysold = Math.floor(e_daysold);
        e_hrsold = (e_daysold - daysold) * 24;
        hrsold = Math.floor(e_hrsold);
        e_minsold = (e_hrsold - hrsold) * 60;
        minsold = Math.floor((e_hrsold - hrsold) * 60);
        seconds = Math.floor((e_minsold - minsold) * 60);
        span_dt_dt.innerHTML = "已存活 " + daysold + " 天 " + hrsold + " 小时 " + minsold + " 分 " + seconds + " 秒";
    }
    show_date_time();
  </script>

    </div>
  </footer>

  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/next-theme-pjax/0.5.0/pjax.min.js" integrity="sha256-3NkoLDrmHLTYj7csHIZSr0MHAFTXth7Ua/DDt4MRUAg=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js" integrity="sha256-yt2kYMy0w8AbtF89WXb2P1rfjcP/HTHLT7097U8Y5b8=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/lozad.js/1.16.0/lozad.min.js" integrity="sha256-mOFREFhqmHeQbXpK2lp4nA3qooVgACfh88fpJftLBbc=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  
<script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.0/search.js" integrity="sha256-vXZMYLEqsROAXkEw93GGIvaB2ab+QW6w3+1ahD9nXXA=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>
<script class="next-config" data-name="chatra" type="application/json">{"enable":true,"async":true,"id":"QXLRxXcsfrRJR2KTG"}</script>
<script src="/js/third-party/chat/chatra.js"></script>
<script async src="https://call.chatra.io/chatra.js"></script>



  <script src="/js/third-party/fancybox.js"></script>

  <script src="/js/third-party/pace.js"></script>

  
  <script data-pjax async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




<script class="next-config" data-name="waline" type="application/json">{"lang":"zh-cn","enable":true,"serverURL":"https://waline-server-kaaaaai.vercel.app","cssUrl":"https://unpkg.com/@waline/client@v2/dist/waline.css","commentCount":true,"pageview":false,"placeholder":"请文明评论呀","avatar":"mm","meta":["nick","mail","link"],"pageSize":10,"visitor":false,"comment_count":true,"requiredFields":[],"libUrl":"//unpkg.com/@waline/client@v2/dist/waline.js","el":"#waline","comment":true,"path":"/add-junk-code-to-ios-vest-project.html"}</script>
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v2/dist/waline.css">
<script>
document.addEventListener('page:loaded', () => {
  NexT.utils.loadComments(CONFIG.waline.el).then(() =>
    NexT.utils.getScript(CONFIG.waline.libUrl, { condition: window.Waline })
  ).then(() => 
    Waline.init(Object.assign({}, CONFIG.waline,{ el: document.querySelector(CONFIG.waline.el) }))
  );
});
</script>


        <style>
            [bg-lazy] {
                background-image: none !important;
                background-color: #eee !important;
            }
        </style>
        <script>
            window.imageLazyLoadSetting = {
                isSPA: true,
                preloadRatio: 1,
                processImages: null,
            };
        </script><script>window.addEventListener("load",function(){var t=/\.(gif|jpg|jpeg|tiff|png)$/i,r=/^data:image\/[a-z]+;base64,/;Array.prototype.slice.call(document.querySelectorAll("img[data-original]")).forEach(function(a){var e=a.parentNode;"A"===e.tagName&&(e.href.match(t)||e.href.match(r))&&(e.href=a.dataset.original)})});</script><script>!function(r){r.imageLazyLoadSetting.processImages=t;var a=r.imageLazyLoadSetting.isSPA,n=r.imageLazyLoadSetting.preloadRatio||1,d=o();function o(){var t=Array.prototype.slice.call(document.querySelectorAll("img[data-original]")),e=Array.prototype.slice.call(document.querySelectorAll("[bg-lazy]"));return t.concat(e)}function t(t){(a||t)&&(d=o());for(var e,i=0;i<d.length;i++)0<=(e=(e=d[i]).getBoundingClientRect()).bottom&&0<=e.left&&e.top<=(r.innerHeight*n||document.documentElement.clientHeight*n)&&function(){var t,e,a,n,o=d[i];e=function(){d=d.filter(function(t){return o!==t}),r.imageLazyLoadSetting.onImageLoaded&&r.imageLazyLoadSetting.onImageLoaded(o)},(t=o).dataset.loaded||(t.hasAttribute("bg-lazy")?(t.removeAttribute("bg-lazy"),e&&e()):(a=new Image,n=t.getAttribute("data-original"),a.onload=function(){t.src=n,t.removeAttribute("data-original"),t.setAttribute("data-loaded",!0),e&&e()},a.onerror=function(){t.removeAttribute("data-original"),t.setAttribute("data-loaded",!1),t.src=n},t.src!==n&&(a.src=n)))}()}function e(){clearTimeout(t.tId),t.tId=setTimeout(t,500)}t(),document.addEventListener("scroll",e),r.addEventListener("resize",e),r.addEventListener("orientationchange",e)}(this);</script></body>
</html>
